<!DOCTYPE HTML>
<html>
<head>
    <script type="text/javascript">

            let mynode=document.getElementsByName('myt');
            document.write(mynode.length)

    </script>
</head>
<body>
<input name="myt" type="text" value="1">
<input name="myt" type="text" value="2">
<input name="myt" type="text" value="3">
<input name="myt" type="text" value="4">
<input name="myt" type="text" value="5">
<input name="myt" type="text" value="6">

<br>
</body>
</html>